package cn.bob.controller;

import cn.bob.domain.User;
import cn.bob.feign.UserServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @author bob
 * @data 2022/11/8-17:34
 */
@RestController
@RequestMapping("/pay")
public class PayContorller {
    @Autowired
    private UserServer userServer;
    //订单调用user表返回user值
    @GetMapping("{id}")
    private User getUser(@PathVariable("id") Long id){
       return userServer.getUser(id);
    }
}
